package com.ai.bitcoin.exception;

import lombok.Data;

@Data
public class BusinessException extends ProcessException {
    String errCode;
    String errInfo;

    public BusinessException(String errCode, String errInfo) {
        this.errCode = errCode;
        this.errInfo = errInfo;
    }

    public BusinessException(String errCode) {
        this.errCode = errCode;
        this.errInfo = errCode;
    }

    public BusinessException(String code, String msg, Exception e) {
        super(code, msg, e);
    }

    @Override
    public String getMessage() {
        return errInfo + "[" + errCode + "]";
    }
}
